<?php
namespace app\home\controller;
use \think\Controller;
class Index extends Controller
{
    public function index()
    {
    	$cate=model("TkProductCate");
    	$dataobj=$cate->where("pc_level=1")->select();
    	$dataobj2=$cate->where("pc_level=2")->select();
    	foreach ($dataobj as $key => $value) {
    		$cates[]=$value->toArray();
    	}
    	foreach ($dataobj2 as $key => $value) {
    		$cates2[]=$value->toArray();
    	}
    	// print_r($cates2);
    	// exit;
    	$this->assign("cates",$cates);
    	$this->assign("cates2",$cates2);
        return view();
    }
}
